<?
require_once "../php/Context.php";
require_once "../php/AdminInit.php";
if(!$admin->isAuthorize())
    echo "<script>document.location.href='../Admin.php';</script>";
?>
<!DOCTYPE html>
<html lang="en" ng-app="MainModule">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin panel</title>

    <link href="../AdminPanelFiles/css/bootstrap.min.css" rel="stylesheet">
    <link href="../AdminPanelFiles/css/sb-admin.css" rel="stylesheet">

    <link href="../css/easy-responsive-tabs.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="../AdminPanelFiles/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <style>

        .resp-tab-content {
            border: none;
        }
        .category_table th{
            text-align: center;
            font-weight: bold;
            font-size: 20px;
        }
        .navbar-inverse .navbar-nav>li>a , .side-nav>li>ul>li>a, .navbar-inverse .navbar-brand,.top-nav>li>a{
            color: #ffffff;
            font-size: 16px;
        }
        .top-nav>li>a:hover, .top-nav>li>a:focus, .top-nav>.open>a, .top-nav>.open>a:hover, .top-nav>.open>a:focus,.side-nav li a:hover, .side-nav li a:focus{
            background-color: #C1C1C1 !important;
        }
        .my_alert{
            width:220px;
        }
        .navbar-inverse{
            background-color: #CC4646;
            border-color:  #CC4646;
        }
        .navbar-inverse .navbar-collapse, .navbar-inverse .navbar-form{
            border-color:  #CC4646;
        }
        .side-nav{
            background-color: #CC4646;
            height: 100%;
        }
        .navbar-inverse .navbar-nav>.active>a{
            background-color: #C1C1C1;
        }
        body,html{
            background-color: #ffffff;
            height: 100%;
        }
        #wrapper{
            height: 100%;
        }
        #page-wrapper{
            height: 100%;
            width: 1650px;
        }

    </style>

</head>

<body>

<div id="wrapper">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html">SB Admin</a>
        </div>
        <ul class="nav navbar-right top-nav">
            <li class="dropdown">

                <ul class="dropdown-menu message-dropdown">
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">

                                <div class="media-body">
                                    <h5 class="media-heading"><strong>Admin</strong>
                                    </h5>
                                    <p class="small text-muted"><i class="fa fa-clock-o"></i> Yesterday at 4:32 PM</p>
                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">
                                    <span class="pull-left">
                                        <img class="media-object" src="http://placehold.it/50x50" alt="">
                                    </span>
                                <div class="media-body">
                                    <h5 class="media-heading"><strong>Admin</strong>
                                    </h5>
                                    <p class="small text-muted"><i class="fa fa-clock-o"></i> Yesterday at 4:32 PM</p>
                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-preview">
                        <a href="#">
                            <div class="media">
                                    <span class="pull-left">
                                        <img class="media-object" src="http://placehold.it/50x50" alt="">
                                    </span>
                                <div class="media-body">
                                    <h5 class="media-heading"><strong>Admin</strong>
                                    </h5>
                                    <p class="small text-muted"><i class="fa fa-clock-o"></i> Yesterday at 4:32 PM</p>
                                    <p>Lorem ipsum dolor sit amet, consectetur...</p>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="message-footer">
                        <a href="#">Read All New Messages</a>
                    </li>
                </ul>
            </li>

            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> Admin<b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li>
                        <a href="#"><i class="fa fa-fw fa-gear"></i> View website</a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="../Admin.php?logout=true"><i class="fa fa-fw fa-power-off"></i> Log Out</a>
                    </li>
                </ul>
            </li>
        </ul>
        <div class="collapse navbar-collapse navbar-ex1-collapse">
            <ul class="nav navbar-nav side-nav">

                <li>
                    <a href="AdminPanel.php"><i class="fa fa-fw fa-edit"></i> Categories</a>
                </li>
                <li >
                    <a href="AdvertisingPanel.php"><i class="fa fa-fw fa-edit"></i> Advertising</a>
                </li>
                <li >
                    <a href="UserPanel.php"><i class="fa fa-fw fa-edit"></i> Users</a>
                </li>
                <li >
                    <a href="ProductPanel.php"><i class="fa fa-fw fa-desktop"></i> Software Products</a>
                </li>
                <li>
                    <a href="javascript:;" data-toggle="collapse" data-target="#demo"><i class="fa fa-fw fa-arrows-v"></i> Other info <i class="fa fa-fw fa-caret-down"></i></a>
                    <ul id="demo" class="collapse">
                        <li>
                            <a href="#">Slider items</a>
                        </li>
                        <li>
                            <a href="#">Telephone</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="blank-page.html"><i class="fa fa-fw fa-file"></i>News</a>
                </li>
                <li>
                    <a href="index-rtl.html"><i class="fa fa-fw fa-dashboard"></i> Contacts</a>
                </li>
            </ul>
        </div>
    </nav>

    <div id="page-wrapper" ng-controller="EditCtrl">
        <div class="container-fluid">
              <div class="row">
                  <div class="col-lg-5">
                      <div class="alert alert-success my_alert" ng-if="enableSuccess == true">
                          <a  class="alert-link">Success! Data is Save.</a>
                      </div>
                      <h3>Edit software product</h3>
                      <form enctype="multipart/form-data">
                          <table  class="product_table table table-striped product_table">
                              <tr>
                                  <td class="title_category">Title product: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Title" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Download_link: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Download_link" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Image: </td>
                                  <td><input type="text"  class="form-control" ng-model="EditProduct.Image"/></td>
                              </tr>
                              <tr>
                                  <td class="title_category">File_size: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.File_size" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Requirements: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Requirements"" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Languages: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Languages"" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Date added: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Date_added" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Author: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Author" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Homepage: </td>
                                  <td><input type="text" class="form-control" ng-model="EditProduct.Homepage" /></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Description_preview: </td>
                                  <td><textarea class="form-control" ng-model="EditProduct.Description_preview" rows="3" cols="3" >

                                        </textarea></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Description: </td>
                                  <td><textarea class="form-control" ng-model="EditProduct.Description" rows="3" cols="3"></textarea></td>
                              </tr>
                              <tr>
                                  <td class="title_category">Category: </td>
                                  <td>
                                      <select class="form-control" ng-options="category.Title for category in Categories" ng-model="Select_Category">
                                      </select>
                                  </td>
                              </tr>
                              <tr>
                                  <td></td>
                                  <td><a  class="btn btn-success"  ng-click="saveChanges()">Send</a></td>
                              </tr>
                          </table>
                      </form>
                  </div>
              </div>



        </div>

    </div>

</div>

<script src="../AdminPanelFiles/js/jquery.js"></script>
<script type="text/javascript" src="../js/move-top.js"></script>
<script type="text/javascript" src="../js/easing.js"></script>
<script src="../js/easyResponsiveTabs.js" type="text/javascript"></script>
<script src="../AdminPanelFiles/js/bootstrap.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#horizontalTab').easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion
            width: 'auto', //auto or any width like 600px
            fit: true   // 100% fit in a container
        });
    });
</script>
<script type="text/javascript" src="../js/angular.js"></script>
<script type="text/javascript" src="/js/AngularControllers/AdminCtrl.js"></script>
<script type="text/javascript" src="/js/AngularControllers/SliderCtrl.js"></script>
<script type="text/javascript" src="/js/AngularControllers/ReadMoreCtrl.js"></script>
<script type="text/javascript" src="/js/AngularControllers/EditCtrl.js"></script>
<script type="text/javascript" src="/js/angularModules/mainModule.js"></script>

</body>
</html>
